package com.kryptowire.daze;

import android.net.Uri;
import android.os.Environment;

public class ITA_Constants {

    public static String outputDir = Environment.getExternalStorageDirectory().getAbsolutePath() + "/" + ITA_Constants.OUTPUT_DIR_BASE; // the output directory
    public final static long MILLISECONDS_TO_LOG = 4000;
    public final static long MILLISECONDS_TO_LOG_RETEST_INTENT = 9000;
    public final static long MILLISECONDS_TO_SLEEP_AFTER_FORCE_STOP_APP = 1999;
    public final static long MILLISECONDS_TO_SLEEP_AFTER_RETEST_INTENT = 3000;
    public final static long MILLISECONDS_TO_SLEEP_BEFORE_SENDING_DYNAMICALLY_REGISTERD_BROADCAST_RECEIVERS = 1000;
    public final static long MILLISECONDS_TO_SLEEP_AFTER_SENDING_DYNAMICALLY_REGISTERD_BROADCAST_RECEIVERS = 1800;
    public final static long MILLISECONDS_TO_SLEEP_AFTER_RETEST_INTENT_SOFT_REBOOT = 20000;
    public final static long MILLISECONDS_AFTER_FAILED_INTENT = 100;
    public final static long MILLISECONDS_AFTER_SOFT_REBOOT = 30000;
    public final static long MILLISECONDS_TO_SLEEP_AFTER_PROVIDER_AUTHORITY_TEST = 1500;
    public final static long MILLISECONDS_TO_SLEEP_DURING_PROVIDER_AUTHORITY_TEST = 3000;
    public final static long MILLISECONDS_TO_SLEEP_WAIT_LOOP = 1000;
    public final static long MILLISECONDS_TO_SLEEP_PROVIDER = 200;
    public final static long MILLISECONDS_TO_SLEEP_AFTER_LOG_START = 2000;
    public final static long MILLISECONDS_TO_SLEEP_AFTER_LOG_START_DISPLAY_RESULT = 500;
    public final static long MILLISECONDS_TO_SLEEP_AFTER_LOG_STOP = 200;
    public final static long MILLISECONDS_TO_SLEEP_BEFORE_CLOSING_ACTIVITY = 500;
    public final static long MILLISECONDS_TO_SLEEP_AFTER_CLEAR_LOG = 200;
    public final static long MILLISECONDS_TO_SLEEP_AFTER_INCREASE_LOG_BUFFER = 250;
    public final static long MILLISECONDS_TO_SLEEP_INBETWEEN_INTENTS_AGGRESSIVE_SENDING = 100;
    public final static long MILLISECONDS_TO_SLEEP_INBETWEEN_SAME_INTENT_ACCELERATED = 750;
    public final static long MILLISECONDS_TO_SLEEP_INBETWEEN_SAME_INTENT = 100;
    public final static long MILLISECONDS_TO_SLEEP_AFTER_PROCESS_CRASH_ACCELERATED = 2000;
    public final static long MILLISECONDS_TO_SLEEP_AFTER_PROCESS_CRASH_NORMAL = 1000;
    public final static long MILLISECONDS_TO_SLEEP_AFTER_CREATE_COMPONENT = 2000;
    public final static long MILLISECONDS_TO_SLEEP_AFTER_FINAL_ACCELERATED_INTENT = 3000;
    public final static long MILLISECONDS_TO_SLEEP_INBETWEEN_SAME_INTENT_DISPLAY_RESULT = 250;
    public final static String OUTPUT_DIR_BASE = "daze";
    public final static String CURRENT_DIR = "currentDir";
    public final static String CURRENT_LOG_DIR = "currentLogDir";
    public final static String CURRENT_LOG_RESULTS_DIR = "currentLogResultsDir";
    public final static String UNKNOWN_DEVICE = "unknownDevice";
    public final static String LOGS = "logs";
    public final static String START_ANALYSIS = "start_analysis";
    public final static String STOP_ANALYSIS = "stop_analysis";
    public final static String ANALYZE_LOGS = "analyze_logs";
    public final static String PERFORMING_ANALYSIS = "performing_analysis";
    public final static String CURRENT_TABLE = "current_table";
    public final static String CURRENT_ROW_ID = "current_row_id";
    public final static String DISALLOWED_BROADCASTS_FILE = "disallowedBroadcastActions.txt";
    public final static String SYSTEM_FAILURE_INTENTS_FILE = "systemFailureIntents.txt";
    public final static String POTENTIAL_SYSTEM_FAILURE_INTENTS_FILE = "potentialSystemFailureIntents.txt";
    public final static String LOG_RESULTS = "logresults";
    public final static String SYSTEM_CRASH = "System Crash";
    public final static String PROCESS_CRASH = "Process Crash";
    public final static String NATIVE_CRASH = "Native Crash";
    public final static String DISPLAY_CRASHES = "Display Crashes";
    public final static String CRASHES_LIST = "Crashes List";
    public final static String ACTION = "action";
    public final static String PACKAGE_NAME = "packageName";
    public final static String COMPONENT_NAME = "componentName";
    public final static String INTENT_BARRAGE = "intentBarrage";
    public final static String DISPLAY_TOAST = "displayToast";
    public final static String TOAST_MESSAGE = "toastMessage";
    public final static String UNAVAILABLE = "unavailable";    
    public final static String LAST_INTENT_SENT = "lastIntentSent";
    public final static String ACCELERATED_TESTING = "acceleratedTesting";
    public final static String FINISHED_ANALYZING_LOGS = "finishedAnalyzingLogs";    
    public final static String START_INTENT_SENDING_TIMESTAMP = "startSendingIntentTimestamp.txt";
    public final static String FINISH_INTENT_SENDING_TIMESTAMP = "finishSendingIntentTimestamp.txt";    
    public final static String START_ANALYZING_LOGS_TIMESTAMP = "startAnalyzingLogsTimestamp.txt";
    public final static String FINISH_ANALYZING_LOGS_TIMESTAMP = "finishAnalyzingLogsTimestamp.txt";    
    public final static String STOP_TIMESTAMP = "stopTimestamp.txt";
    public final static String KILLED_AFTER_GRANT = "killedAfterGrant";
    public final static String NOT_FIRST_RUN = "notFirstRun";    
    public final static String TEST_ACTIVITY = "testActivity";
    public final static String TEST_SERVICE = "testService";
    public final static String TEST_RECEIVER = "testReceiver";
    public final static String TEST_PROVIDER = "testProviders";
    public final static String TEST_BROADCASTACTION = "testBroadcastAction";
    public final static boolean WRITE_FAILED_BROADCAST_INTENTS_TO_FILE = false;
    public final static String ONLY_SYSTEM_SERVER = "onlySystemServer";
    public final static String ANALYZING_LOGS = "analyzingLogs";
    public final static String PACKAGE_NAME_LIST = "packageNameList";
    public final static String TARGETED_APP = "targetedApp";
    public final static String RETESTING_INTENT_SYSTEM_CRASH = "retestingIntentSystemCrash";
    public final static int NUMBER_INTENTS_TO_SEND_ACCELERATED = 10;
    public final static int CREATE_LOG_READER_ERROR = -1;
    public final static int LOG_READER_END_OF_STREAM = -2;
    public final static int LOG_READER_NORMAL_EXIT = 0;
    public final static char DELIMITER_CHAR_LOG = '|';
    public final static boolean RETEST_ALL_INTENTS_WITH_A_CRASH = true;
    public final static String PREVENT_RECURRING_FATAL_ERRORS = "preventRecurringFatalErros";
    public final static String GLOBAL_SEQUENTIAL_ID = "globalSequentialId";    
    public final static String ONE_STACKTRACE_PER_CRASH = "oneStacktracePerCrash";
    public final static String FINISHED_INITIAL_SENDING_OF_INTENTS = "finishedInitalSendingOfIntents";
    public final static String CURRENT_LOG_FILE = "currentLogFile";
    public final static String SYSTEM_APP = "systemApp";
    public final static String UPDATED_SYSTEM_APP = "updatedSystemApp";
    public final static String THIRD_PARTY_APP = "thirdPartyApp";
    public final static String CONTINUE_TESTING_ACTION = "com.kryptowire.daze.continue";
    public final static String DEVICE_REBOOTED_RESUME_ANALYSIS = "com.kryptowire.daze.rebooted";
    public final static String AUTHORITY = "authority";
    public final static String CHECK_FOR_PRIVILEGE_ESCALTION = "checkForPrivilegeEscalation";
    public final static String[] PACKAGE_NAMES_TO_SKIP = {};
    public final static String DISPLAY_POTENTIAL_PRIVILEGE_ESCALATION = "Display Potential Privilege Escalation";
    public final static String POTENTIAL_PRIVILEGE_ESCALATION_LIST = "potentialPrivilegeEscalationList";    
    public final static String POTENTIAL_PRIVILEGE_ESCALATION_DISPLAY_RESULT = "potentialPrivilegeEscalationResult";
    public final static String PROCESS_CRASH_DISPLAY_RESULT = "processCrashDisplayResults";
    public final static String DID_NOT_EXIST = "Did not exist";
    public final static String DOES_NOT_EXIST = "Does not exist";
    public final static String ADDED_FILE = "New File Appeared After Intent";
    public final static String REMOVED_FILE = "File Deleted After Intent";
    public final static String SETTINGS_CHANGE = "Settings Value Changed After Intent";
    public final static String SETTINGS_ADDED = "Settings Added After Intent";
    public final static String SETTINGS_REMOVED = "Settings Removed After Intent";    
    public final static String PROPERTIES_CHANGE = "Property Value Changed After Intent";
    public final static String PROPERTIES_ADDED = "Property Added After Intent";
    public final static String PROPERTIES_REMOVED = "Property Removed After Intent";
    public final static String FINISH_ACTIVITY = "finishActivity";
    public final static String SCHEMELESS_URI_STRING = "daze";
    public final static Uri SCHEMLESS_URI = Uri.parse(SCHEMELESS_URI_STRING);
    public final static String FINISH_ANALYZING_SINGLE_APP_WITH_PATH_TAG = "ITA_FinishedSingleApp";
    public final static String AGGRESSIVE_BROADCAST_RECEIVER_TESTING = "aggressiveBroadcastReceiverTesting";
    public final static String IS_BROADCAST_ACTION = "isBroadcastAction";
    public final static String NUM_TIMES_APP_KILLED_ON_TROUBLESOME_COMPONENT = "numTimesAppKilledOnTroublesomeComponent";
    public final static String TROUBLESOME_COMPONENT_NAME = "troublesomeComponentName";
    public final static int NUM_TIMES_KILLED_SKIP_THRESHOLD = 3;
    public final static String HASHSET_APP_KILLER_COMPONENT_NAME = "hashSetAppKillerComponentNames";
    public final static String HASHSET_APP_KILLER_ACTION = "hashSetAppKillerActions";
    public final static boolean KILL_APP_BEFORE_FIRST_TEST_FOR_BETTER_DYN_BROAD_REG_IDENTIFICATION = true;
    public final static boolean WRITE_ALL_COMPONENTS_TO_SEPARATE_TABLE = true;
    public final static String FORCESTOP_APP_TAG = "ITA_Forcestop_Package";
    public final static int IS_DYNAMIC_RECEIVER_CRASH = 1;
    public final static int IS_NOT_DYNAMIC_RECEIVER_CRASH = 0;
    public final static String CURRENT_PACKAGE_NAME_DYNAMIC_RECEIVER_TEST = "currentPackageNameDynamicReceiverTest";
    public final static String CURRENT_ACTIION_DYNAMIC_RECEIVER_TEST = "currentActionDynamicReceiverTest";
    public final static String TESTED_DYNAMIC_BROADCAST_ACTIONS_FOR_APP = "testedBroadcastActions";
    public final static String PLACEHOLDER_INTENT_ACTION = "com.kryptowire.daze.placeholder.action";
    public final static int PLACE_HOLDER_REQUEST_CODE = 235978243;
    // some exceptions for samsung where system properties get changed frequently
    public final static String[] SYSTEM_PROPERTIES_TO_IGNORE = {"[ril.signal.param]", "[dev.ssrm.pst]", "[dev.ssrm.app.install.standby]", "[sys.siop.level]"};
    
    
}

